If you want to print on paper the view displayed in ViewportLayout control, you can follow the approach reported in this article.
Suppose that your viewport looks like this:
and you want to print it on paper in hidden line mode.
Your printButton handler should contain the following code lines:
Through HiddenLinesViewSetting class you can customize several preview parameters (here you can see PenEdge and PenSilhouette color set to Blue, and their width line thickness set to one).
Finally, object HiddenLinesViewOnPaperPreview creates the preview opening the window reported below.
Please note that HiddenLinesViewOnPaperPreview class takes as arguments the settings we have created first, the dimensions of the preview windows and the scale factor. Scale factor permits you to calibrate the dimension of your entities on paper. If you want, for example, print the entities with the same dimension you have drawn them on viewport, you should set scale factor to 1.
Finally, if you prefer to print directly without displaying the preview window, you should use HiddenLinesViewOnPaper object instead of HiddenLinesViewOnPaperPreview.